<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>数组常用的几种方法</title>
</head>
<body>

</body>
</html>
<script>
    let arr = [1,3,5,7,9]

    // arr.unshift(6)
    // console.log(arr)
    console.log(arr.pop()) // pop返回是删除数组的最后一项
    console.log(arr)
    // let res = arr.join('-') // join是将数组拼装成字符串
    // console.log(res)

    let str = 'abcdef'
    let res = str.split('')// 注意有空格和无空格的区别
    console.log(res)
</script>
